package com.glq1218.article.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 物品表(Article)表实体类
 *
 * @author glq1218
 * @since 2023-04-23 10:30:36
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Article implements Serializable {
    @Serial
    private static final long serialVersionUID = -17459244688388282L;

    /**
     * 主键id
     */
    @Schema(description = "主键id")
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 物品名称
     */
    @Schema(description = "物品名称")
    private String name;
    /**
     * 物品租赁价格
     */
    @Schema(description = "物品租赁价格")
    private BigDecimal leasingPrice;
    /**
     * 发布人
     */
    @Schema(description = "发布人")
    private Long userId;
    /**
     * 分类id
     */
    @Schema(description = "分类id")
    private Long categoryId;

    private String description;
    /**
     * 状态，0：启用，1：禁用
     */
    @Schema(description = "状态，0：启用，1：禁用")
    private Byte status;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createdAt;
    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;
    /**
     * 逻辑删除字段
     */
    @Schema(description = "逻辑删除字段")
    private Byte isDeleted;
}
